//
// Project: Disagreement in science: Missing women


clear all
version 15.1  



//
// set locals

// method of identifying female variable
local female "female_genderize"

// gender of author is known
local known_gender "female_genderize!=."




//
// Biorxiv

// call data
use "${data}/output/biorxiv_gender.dta", clear

by article_id, sort: egen number_authors = count(article_id)
generate solo_authored = number_authors==1
generate type_edited = .
replace type_edited=1 if results_type_id==3
replace type_edited=2 if results_type_id==1
replace type_edited=3 if results_type_id==2

// analysis
regress `female' i.type_edited if `known_gender' & solo_authored==1, vce(robust)
margins type_edited
marginsplot, plotregion(style(none)) scheme(s1color) noci recast(bar) ylabel(0 .03 "0.03" .06 "0.06" .09 "0.09" .12 "0.12" .15 "0.15" 0.18 "0.18", grid angle(horizontal) labsize(medsmall)) yscale(r(., .18)) plotopts(mlabel(y) mlabposition(12) mlabsize(medium) mlabformat(%9.3f) mlabcolor(gs3) barwidth(0.5) color(gs3%80) lwidth(thin)) title("") xtitle("") ytitle("Share of solo-authored papers authored by women") xlabel(1 "New" 2 "Confirmatory" 3 "Contradictory", noticks labsize(medsmall))
graph export "${output}/solo_author_biorxiv.eps", replace
graph export "${output}/solo_author_biorxiv.png", replace

